#include "Track.h"

GLuint Track::baseList;

void Track::setup()
{
	baseList = glGenLists(1);
	
	glNewList(baseList, GL_COMPILE);
	
	drawMap();	
	
	glEndList();
}

void Track::cleanup()
{
	glDeleteLists(baseList, 1);
}

Track::Track()
{
}

Track::~Track()
{
}

void Track::draw() const
{
	glPushMatrix();
		glCallList(baseList);
	glPopMatrix();
}


//draw functions - there are a lot of them so hold on tight, eh?
void Track::drawSmallRoad() {
	//glEnable(GL_TEXTURE_2D);
	//glBindTexture(GL_TEXTURE_2D, text01_2D);
	glBegin(GL_QUADS);
	//glTexCoord2f(0.0f, 1.0f);
	glVertex3f(0.0f, 0.0f, 0.0f);
	//glTexCoord2f(0.0f, 0.0f);
	glVertex3f(0.0f, 0.0f, 1.0f);
	//glTexCoord2f(1.0f, 0.0f);
	glVertex3f(1.0f, 0.0f, 1.0f);
	//glTexCoord2f(1.0f, 1.0f);
	glVertex3f(1.0f,0.0f, 0.0f);
	glEnd();
}

void Track::drawMediumRoad() {
        //glEnable(GL_TEXTURE_2D);
        //glBindTexture(GL_TEXTURE_2D, text02_2D);
        glBegin(GL_QUADS);
        //glTexCoord2f(0.0f, 1.0f);
        glVertex3f(0.0f, 0.0f, 0.0f);
        //glTexCoord2f(0.0f, 0.0f);
        glVertex3f(0.0f, 0.0f, 2.0f);
        //glTexCoord2f(1.0f, 0.0f);
        glVertex3f(2.0f, 0.0f, 2.0f);
        //glTexCoord2f(1.0f, 1.0f);
        glVertex3f(2.0f,0.0f, 0.0f);
        glEnd();
}

void Track::drawLargeRoad() {
	//glEnable(GL_TEXTURE_2D);
        //glBindTexture(GL_TEXTURE_2D, text03_2D);
        glBegin(GL_QUADS);
        //glTexCoord2f(0.0f, 1.0f);
        glVertex3f(0.0f, 0.0f, 0.0f);
        //glTexCoord2f(0.0f, 0.0f);
        glVertex3f(0.0f, 0.0f, 3.0f);
        //glTexCoord2f(1.0f, 0.0f);
        glVertex3f(3.0f, 0.0f, 3.0f);
        //glTexCoord2f(1.0f, 1.0f);
        glVertex3f(3.0f, 0.0f, 0.0f);
        glEnd();
}

void Track::drawBumpers() {
	//glEnable(GL_TEXTURE_2D);

	GLUquadricObj *cylBump;
	cylBump = gluNewQuadric();

	//glBindTexture(GL_TEXTURE_2D, text04_2D)
	//gluQuadricTexture(cylBump, GL_TRUE);
	//gluQuadricDrawStyle(cylBump, GLU_FILL);
	//gluQuadricNormals(cylBump, GLU_SMOOTH);
	
	glRotatef(90, 0.0f, 1.0f, 0.0f);
	gluCylinder(cylBump, 0.5f, 0.5f, 1.0f, 25, 25);
}

void Track::drawSmallTriangle_TL() {
	//glEnable(GL_TEXTURE_2D);
	//glBindTexture(GL_TEXTURE_2D, text01_2D);
	glBegin(GL_POLYGON);
	//glTexCoord2f(0.0f, 1.0f);
	glVertex3f(0.0f, 0.0f, 0.0f);
	//glTexCoord2f(0.0f, 0.0f);
	glVertex3f(0.0f, 0.0f, 1.0f);
	//glTexCoord2f(1.0f, 1.0f);
	glVertex3f(1.0f, 0.0f, 0.0f);
	glEnd();
}

void Track::drawSmallTriangle_BL() {
	//glEnable(GL_TEXTURE_2D);
	//glBindTexture(GL_TEXTURE_2D, text01_2D);
	glBegin(GL_POLYGON);
	//glTexCoord2f(0.0f, 1.0f);
	glVertex3f(0.0f, 0.0f, 0.0f);
	//glTexCoord2f(0.0f, 0.0f);
	glVertex3f(0.0f, 0.0f, 1.0f);
	//glTexCoord2f(1.0f, 0.0f);
	glVertex3f(1.0f, 0.0f, 1.0f);
	glEnd();
}

void Track::drawSmallTriangle_BR() {
	//glEnable(GL_TEXTURE_2D);
	//glBindTexture(GL_TEXTURE_2D, text01_2D);
	glBegin(GL_POLYGON);
	//glTexCoord2f(0.0f, 0.0f);
	glVertex3f(0.0f, 0.0f, 1.0f);
	//glTexCoord2f(1.0f, 0.0f);
	glVertex3f(1.0f, 0.0f, 1.0f);
	//glTexCoord2f(1.0f, 1.0f);
	glVertex3f(1.0f, 0.0f, 0.0f);
	glEnd();
}

void Track::drawSmallTriangle_TR() {
	//glEnable(GL_TEXTURE_2D);
	//glBindTexture(GL_TEXTURE_2D, text01_2D);
	glBegin(GL_POLYGON);
	//glTexCoord2f(0.0f, 1.0f);
	glVertex3f(0.0f, 0.0f, 0.0f);
	//glTexCoord2f(1.0f, 0.0f);
	glVertex3f(1.0f, 0.0f, 1.0f);
	//glTexCoord2f(1.0f, 1.0f);
	glVertex3f(1.0f, 0.0f, 0.0f);
	glEnd();
}

void Track::drawLargeTriangle_TL() {
	//glEnable(GL_TEXTURE_2D);
	//glBindTexture(GL_TEXTURE_2D, text02_2D);
	glBegin(GL_POLYGON);
        //glTexCoord2f(0.0f, 1.0f);
        glVertex3f(0.0f, 0.0f, 0.0f);
        //glTexCoord2f(0.0f, 0.0f);
        glVertex3f(0.0f, 0.0f, 2.0f);
        //glTexCoord2f(1.0f, 1.0f);
        glVertex3f(2.0f, 0.0f, 0.0f);
        glEnd();
}

void Track::drawLargeTriangle_BL() {
	//glEnable(GL_TEXTURE_2D);
	//glBindTexture(GL_TEXTURE_2D, text02_2D);
	glBegin(GL_POLYGON);
	//glTexCoord2f(0.0f, 1.0f);
	glVertex3f(0.0f, 0.0f, 0.0f);
	//glTexCoord2f(0.0f, 0.0f);
	glVertex3f(0.0f, 0.0f, 2.0f);
	//glTexCoord2f(1.0f, 0.0f);
	glVertex3f(2.0f, 0.0f, 2.0f);
	glEnd();
}

void Track::drawLargeTriangle_BR() {
	//glEnable(GL_TEXTURE_2D);
	//glBindTexture(GL_TEXTURE_2D, text02_2D);
	glBegin(GL_POLYGON);
	//glTexCoord2f(0.0f, 0.0f);
	glVertex3f(0.0f, 0.0f, 2.0f);
	//glTexCoord2f(1.0f, 0.0f);
	glVertex3f(2.0f, 0.0f, 2.0f);
	//glTexCoord2f(1.0f, 1.0f);
	glVertex3f(2.0f, 0.0f, 0.0f);
	glEnd();
}

void Track::drawLargeTriangle_TR() {
	//glEnable(GL_TEXTURE_2D);
	//glBindTexture(GL_TEXTURE_2D, text02_2D);
	glBegin(GL_POLYGON);
	//glTexCoord2f(0.0f, 1.0f);
	glVertex3f(0.0f, 0.0f, 0.0f);
	//glTexCoord2f(1.0f, 0.0f);
	glVertex3f(2.0f, 0.0f, 2.0f);
	//glTexCoord2f(1.0f, 1.0f);
	glVertex3f(2.0f, 0.0f, 0.0f);
	glEnd();
}

void Track::drawTrafficCone() {
	glColor3f(1.0f, 0.5f, 0.0f);
	//glEnable(GL_TEXTURE_2D, text05_2D);
	
	GLUquadricObj *cylConeBottom;
	cylConeBottom = gluNewQuadric();
	GLUquadricObj *cylConeTop;
	cylConeTop = gluNewQuadric();

	glPushMatrix();
	//glBindTexture(GL_TEXTURE_2D, text05_2D)
        //gluQuadricTexture(cylConeBottom, GL_TRUE);
        //gluQuadricDrawStyle(cylConeBottom, GLU_FILL);
        //gluQuadricNormals(cylConeBottom, GLU_SMOOTH);
	glTranslatef(0.0f, 0.1f, 0.0f);
	glRotatef(90, 1.0f, 0.0f, 0.0f);
	gluCylinder(cylConeBottom, 0.3f, 0.3f, 0.2f, 30, 30);
	glPopMatrix();

	//glDisable(GL_TEXTURE_2D, text05_2D);
	//glEnable(GL_TEXTURE_2D, text06_2D);

	glPushMatrix();
	//glBindTexture(GL_TEXTURE_2D, text06_2D)
        //gluQuadricTexture(cylConeTop, GL_TRUE);
        //gluQuadricDrawStyle(cylConeTop, GLU_FILL);
        //gluQuadricNormals(cylConeTop, GLU_SMOOTH);
	glTranslatef(0.0f, 0.85f, 0.0f);
	glRotatef(90, 1.0f, 0.0f, 0.0f);
	gluCylinder(cylConeTop, 0.0f, 0.25f, 0.60f, 30, 30);
	glPopMatrix();
}

void Track::drawTree() {
	glColor3f(0.5f, 0.3f, 0.0f);
	//glEnable(GL_TEXTURE_2D, text07_2D);

	GLUquadricObj *cylTrunk;
	cylTrunk = gluNewQuadric();
	GLUquadricObj *cylBranchLeft;
	cylBranchLeft = gluNewQuadric();
	GLUquadricObj *cylBranchRight;
	cylBranchRight = gluNewQuadric();

	glPushMatrix();
	//glBindTexture(GL_TEXTURE_2D, text07_2D)
        //gluQuadricTexture(cylTrunk, GL_TRUE);
        //gluQuadricDrawStyle(cylTrunk, GLU_FILL);
        //gluQuadricNormals(cylTrunk, GLU_SMOOTH);
	glTranslatef(0.0f, 3.0f, 0.0f);
	glRotatef(90, 1.0f, 0.0f, 0.0f);
	gluCylinder(cylTrunk, 0.2f, 0.5f, 3.0f, 50, 50);
	glPopMatrix();
	//glDisable(GL_TEXTURE_2D, text07_2D);
	
	//glEnable(GL_TEXTURE_2D, text08_2D);
	glPushMatrix();
	//glBindTexture(GL_TEXTURE_2D, text08_2D)
        //gluQuadricTexture(cylBranchRight, GL_TRUE);
        //gluQuadricDrawStyle(cylBranchRight, GLU_FILL);
        //gluQuadricNormals(cylBranchRight, GLU_SMOOTH);
	glTranslatef(0.0f, 2.1f, 0.0f);
	glRotatef(90, 0.0f, 1.0f, 0.15f);
	gluCylinder(cylBranchRight, 0.1f, 0.05f, 0.5f, 50, 50);
	glPopMatrix();
	//glDisable(GL_TEXTURE_2D, text08_2D);

	//glEnable(GL_TEXTURE_2D, text09_2D);
	glPushMatrix();
	//glBindTexture(GL_TEXTURE_2D, text09_2D)
        //gluQuadricTexture(cylBranchLeft, GL_TRUE);
        //gluQuadricDrawStyle(cylBranchLeft, GLU_FILL);
        //gluQuadricNormals(cylBranchLeft, GLU_SMOOTH);
	glTranslatef(0.0f, 2.5f, 0.0f);
	glRotatef(-90, 0.0f, 1.25f, 0.75f);
	gluCylinder(cylBranchLeft, 0.15f, 0.05f, 0.7f, 50, 50);
	glPopMatrix();
	//glDisable(GL_TEXTURE_2D, text09_2D);

	
	glColor3f(0.0f, 1.0f, 0.0f);
	//glEnable(GL_TEXTURE_2D, text10_2D);
	GLUquadricObj *sphereMain;
	sphereMain = gluNewQuadric();
	GLUquadricObj *sphereLeft;
	sphereLeft = gluNewQuadric();
	GLUquadricObj *sphereRight;
	sphereRight = gluNewQuadric();

	glPushMatrix();
	//glBindTexture(GL_TEXTURE_2D, text10_2D)
        //gluQuadricTexture(sphereMain, GL_TRUE);
        //gluQuadricDrawStyle(sphereMain, GLU_FILL);
        //gluQuadricNormals(sphereMain, GLU_SMOOTH);
	glTranslatef(0.0f, 4.35f, 0.0f);
	gluSphere(sphereMain, 1.25f, 50, 50);
	glPopMatrix();
	//glDisable(GL_TEXTURE_2D, text10_2D);
	
	glPushMatrix();
	//glBindTexture(GL_TEXTURE_2D, text11_2D)
        //gluQuadricTexture(sphereLeft, GL_TRUE);
        //gluQuadricDrawStyle(sphereLeft, GLU_FILL);
        //gluQuadricNormals(sphereLeft, GLU_SMOOTH);
	glTranslatef(-1.2f, 3.2f, 0.0f);
	gluSphere(sphereLeft, 0.5f, 50, 50);
	glPopMatrix();
	//glDisable(GL_TEXTURE_2D, text12_2D);

	glPushMatrix();
	//glBindTexture(GL_TEXTURE_2D, text12_2D)
        //gluQuadricTexture(sphereRight, GL_TRUE);
        //gluQuadricDrawStyle(sphereRight, GLU_FILL);
        //gluQuadricNormals(sphereRight, GLU_SMOOTH);
	glTranslatef(0.85f, 2.3f, 0.0f);
	gluSphere(sphereRight, 0.3f, 50, 50);
	glPopMatrix();
	//glDisable(GL_TEXTURE_2D, text11_2D);
}

void Track::drawStartingLine() {
	//glEnable(GL_TEXTURE_2D);
	//glBindTexture(GL_TEXTURE_2D, text12_2D);
	glBegin(GL_QUADS);
	//glTexCoord2f(0.0f, 1.0f);
	glVertex3f(0.0f, 0.0f, 0.0f);
	//glTexCoord2f(0.0f, 0.0f);
	glVertex3f(0.0f, 0.0f, 4.0f);
	//glTexCoord2f(1.0f, 0.0f);
	glVertex3f(1.0f, 0.0f, 4.0f);
	//glTexCoord2f(1.0f, 1.0f);
	glVertex3f(1.0f,0.0f, 0.0f);
	glEnd();
}

void Track::drawMap() {

	glPushMatrix();

	//track
	glColor3f(0.5f, 0.5f, 0.5f);
	glTranslatef(-5.0f, 0.0f, -3.0f); //(-5,-3)
	drawMediumRoad();
	glTranslatef(2.0f, 0.0f, 0.0f); //(-3,-3)
	drawMediumRoad();
	glTranslatef(2.0f, 0.0f, 0.0f); //(-1,-3)
	drawMediumRoad();
	glTranslatef(2.0f, 0.0f, 0.0f); //(1,-3)
	drawMediumRoad();
	glTranslatef(2.0f, 0.0f, 0.0f); //(3,-3)
	drawSmallRoad();
	glTranslatef(1.0f, 0.0f, 0.0f); //(4,-3)
	drawSmallRoad();
	glTranslatef(1.0f, 0.0f, 0.0f); //(5,-3)
	drawSmallTriangle_BL();
	glTranslatef(-2.0f, 0.0f, 1.0f); //(3,-2)
	drawLargeRoad();
	glTranslatef(-1.0f, 0.0f, 1.0f); //(2,-1)
	drawSmallTriangle_TR();
	glTranslatef(1.0f, 0.0f, 2.0f); //(3,1)
	drawLargeRoad();
	glTranslatef(0.0f, 0.0f, 3.0f); //(3,4)
	drawLargeRoad();
	glTranslatef(0.0f, 0.0f, 3.0f); //(3,7)
	drawLargeRoad();
	glTranslatef(0.0f, 0.0f, 3.0f); //(3,10)
	drawSmallRoad();
	glTranslatef(0.0f, 0.0f, 1.0f); //(3,11)
	drawSmallTriangle_TR();
	glTranslatef(1.0f, 0.0f, -1.0f); //(4,10)
	drawMediumRoad();
	glTranslatef(2.0f, 0.0f, 0.0f); //(6,10)
	drawMediumRoad();
	glTranslatef(0.0f, 0.0f, -1.0f); //(6,9)
	drawSmallTriangle_BL();
	glTranslatef(2.0f, 0.0f, 1.0f); //(8,10)
	drawMediumRoad();
	glTranslatef(2.0f, 0.0f, 0.0f); //(10,10)
	drawMediumRoad();
	glTranslatef(2.0f, 0.0f, 0.0f); //(12,10)
	drawMediumRoad();
	glTranslatef(2.0f, 0.0f, 0.0f); //(14,10)
	drawMediumRoad();
	glTranslatef(2.0f, 0.0f, 0.0f); //(16,10)
	drawMediumRoad();
	glTranslatef(2.0f, 0.0f, 0.0f); //(18,10)
	drawLargeTriangle_TL();
	glTranslatef(-1.0f, 0.0f, -1.0f); //(17,9)
	drawSmallTriangle_BR();
	glTranslatef(1.0f, 0.0f, -1.0f); //(18,8)
	drawMediumRoad();
	glTranslatef(0.0f, 0.0f, -2.0f); //(18,6)
	drawMediumRoad();
	glTranslatef(0.0f, 0.0f, -2.0f); //(18,4)
	drawMediumRoad();
	glTranslatef(0.0f, 0.0f, -2.0f); //(18,2)
	drawMediumRoad();
	glTranslatef(-1.0f, 0.0f, 0.0f); //(17,2)
	drawSmallTriangle_TR();
	glTranslatef(1.0f, 0.0f, -2.0f); //(18,0)
	drawLargeTriangle_BL();
	glTranslatef(-2.0f, 0.0f, 0.0f); //(16,0)
	drawMediumRoad();
	glTranslatef(-2.0f, 0.0f, 0.0f); //(14,0)
	drawMediumRoad();
	glTranslatef(-2.0f, 0.0f, 0.0f); //(12,0)
	drawMediumRoad();
	glTranslatef(-2.0f, 0.0f, 0.0f); //(10,0)
	drawLargeTriangle_TR();
	glTranslatef(2.0f, 0.0f, -1.0f); //(12,-1)
	drawSmallTriangle_BL();
	glTranslatef(-2.0f, 0.0f, -1.0f); //(10,-2)
	drawMediumRoad();
	glTranslatef(0.0f, 0.0f, -2.0f); //(10,-4)
	drawMediumRoad();
	glTranslatef(2.0f, 0.0f, 0.0f); //(12,-4)
	drawSmallTriangle_TL();
	glTranslatef(-2.0f, 0.0f, -2.0f); //(10,-6)
	drawLargeTriangle_BR();
	glTranslatef(2.0f, 0.0f, 0.0f); //(12,-6)
	drawMediumRoad();
	glTranslatef(2.0f, 0.0f, 0.0f); //(14,-6)
	drawMediumRoad();
	glTranslatef(1.0f, 0.0f, -1.0f); //(15,-7)
	drawSmallTriangle_BR();
	glTranslatef(1.0f, 0.0f, 1.0f); //(16,-6)
	drawLargeTriangle_TL();
	glTranslatef(0.0f, 0.0f, -2.0f); //(16,-8)
	drawMediumRoad();
	glTranslatef(0.0f, 0.0f, -2.0f); //(16,-10)
	drawMediumRoad();
	glTranslatef(-1.0f, 0.0f, 0.0f); //(15,-10)
	drawSmallTriangle_TR();
	glTranslatef(1.0f, 0.0f, -2.0f); //(16,-12)
	drawLargeTriangle_BL();
	glTranslatef(-2.0f, 0.0f, 0.0f); //(14,-12)
	drawMediumRoad();
	glTranslatef(-2.0f, 0.0f, 0.0f); //(12,-12)
	drawMediumRoad();
	glTranslatef(-2.0f, 0.0f, 0.0f); //(10,-12)
	drawMediumRoad();
	glTranslatef(-2.0f, 0.0f, 0.0f); //(8,-12)
	drawMediumRoad();
	glTranslatef(-2.0f, 0.0f, 0.0f); //(6,-12)
	drawMediumRoad();
	glTranslatef(-2.0f, 0.0f, 0.0f); //(4,-12)
	drawMediumRoad();
	glTranslatef(-2.0f, 0.0f, 0.0f); //(2,-12)
	drawMediumRoad();
	glTranslatef(-2.0f, 0.0f, 0.0f); //(0,-12)
	drawMediumRoad();
	glTranslatef(-2.0f, 0.0f, 0.0f); //(-2,-12)
	drawMediumRoad();
	glTranslatef(-2.0f, 0.0f, 0.0f); //(-4,-12)
	drawMediumRoad();
	glTranslatef(-2.0f, 0.0f, 0.0f); //(-6,-12)
	drawMediumRoad();
	glTranslatef(-2.0f, 0.0f, 0.0f); //(-8,-12)
	drawMediumRoad();
	glTranslatef(-1.0f, 0.0f, -1.0f); //(-9,-13)

	//starting line
	glColor3f(1.0f, 1.0f, 1.0f);
	drawStartingLine();
	glTranslatef(-2.0f, 0.0f, 1.0f); //(-11,-12)
	
	//track	
	glColor3f(0.5f, 0.5f, 0.5f);
	drawMediumRoad();
	glTranslatef(-2.0f, 0.0f, 0.0f); //(-13,-12)
	drawMediumRoad();
	glTranslatef(-2.0f, 0.0f, 0.0f); //(-15,-12)
	drawMediumRoad();
	glTranslatef(-1.0f, 0.0f, 0.0f); //(-16,-12)
	drawSmallRoad();
	glTranslatef(-1.0f, 0.0f, 0.0f); //(-17,-12)
	drawSmallTriangle_BR();
	glTranslatef(0.0f, 0.0f, 1.0f); //(-17,-11)
	drawMediumRoad();
	glTranslatef(0.0f, 0.0f, 2.0f); //(-17,-9)
	drawMediumRoad();
	glTranslatef(0.0f, 0.0f, 2.0f); //(-17,-7)
	drawMediumRoad();
	glTranslatef(0.0f, 0.0f, 2.0f); //(-17,-5)
	drawMediumRoad();
	glTranslatef(0.0f, 0.0f, 2.0f); //(-17,-3)
	drawMediumRoad();
	glTranslatef(-2.0f, 0.0f, 0.0f); //(-19,-3)
	drawLargeTriangle_BR();
	glTranslatef(0.0f, 0.0f, 2.0f); //(-19,-1)
	drawMediumRoad();
	glTranslatef(2.0f, 0.0f, 0.0f); //(-17,-1)
	drawLargeTriangle_TL();
	glTranslatef(-2.0f, 0.0f, 2.0f); //(-19,1)
	drawMediumRoad();
	glTranslatef(0.0f, 0.0f, 2.0f); //(-19,3)
	drawMediumRoad();
	glTranslatef(2.0f, 0.0f, 0.0f); //(-17,3)
	drawLargeTriangle_BL();
	glTranslatef(-2.0f, 0.0f, 2.0f); //(-19,5)
	drawLargeTriangle_TR();
	glTranslatef(2.0f, 0.0f, 0.0f); //(-17,5)
	drawMediumRoad();
	glTranslatef(0.0f, 0.0f, 2.0f); //(-17,7)
	drawMediumRoad();
	glTranslatef(2.0f, 0.0f, 1.0f); //(-15,8)
	drawSmallTriangle_BL();
	glTranslatef(-2.0f, 0.0f, 1.0f); //(-17,9)
	drawLargeTriangle_TR();
	glTranslatef(2.0f, 0.0f, 0.0f); //(-15,9)
	drawMediumRoad();
	glTranslatef(2.0f, 0.0f, 0.0f); //(-13,9)
	drawMediumRoad();
	glTranslatef(2.0f, 0.0f, 0.0f); //(-11,9)
	drawMediumRoad();
	glTranslatef(2.0f, 0.0f, 0.0f); //(-9,9)
	drawMediumRoad();
	glTranslatef(1.0f, 0.0f, -1.0f); //(-8,8)
	drawSmallTriangle_BR();
	glTranslatef(1.0f, 0.0f, 1.0f); //(-7,9)
	drawLargeTriangle_TL();
	glTranslatef(0.0f, 0.0f, -2.0f); //(-7,7)
	drawMediumRoad();
	glTranslatef(0.0f, 0.0f, -2.0f); //(-7,5)
	drawMediumRoad();
	glTranslatef(0.0f, 0.0f, -2.0f); //(-7,3)
	drawMediumRoad();
	glTranslatef(0.0f, 0.0f, -2.0f); //(-7,1)
	drawMediumRoad();
	glTranslatef(0.0f, 0.0f, -2.0f); //(-7,-1)
	drawMediumRoad();
	glTranslatef(0.0f, 0.0f, -2.0f); //(-7,-3)
	drawLargeTriangle_BR();
	glTranslatef(2.0f, 0.0f, 2.0f); //(-5, -1)
	drawSmallTriangle_TL();

	glPopMatrix();

	//trees
	glPushMatrix();
	glTranslatef(-4.0f, 0.0f, -5.0f);
	glScalef(0.5f, 0.45f, 0.5f);
	drawTree();
	glPopMatrix();
	
	glPushMatrix();
	glTranslatef(0.0f, 0.0f, -4.5f);
	glScalef(0.5f, 0.45f, 0.5f);
	glRotatef(30, 0.0f, 1.0f, 0.0f);
	drawTree();
	glPopMatrix();

	glPushMatrix();
	glTranslatef(4.0f, 0.0f, -4.5f);
	glScalef(0.5f, 0.45f, 0.5f);
	glRotatef(170, 0.0f, 1.0f, 0.0f);
	drawTree();
	glPopMatrix();

	glPushMatrix();
	glTranslatef(11.0f, 0.0f, 9.0f);
	glScalef(0.5f, 0.45f, 0.5f);
	glRotatef(45, 0.0f, 1.0f, 0.0f);
	drawTree();
	glPopMatrix();

	glPushMatrix();
	glTranslatef(15.0f, 0.0f, 8.0f);
	glScalef(0.5f, 0.45f, 0.5f);
	glRotatef(300, 0.0f, 1.0f, 0.0f);
	drawTree();
	glPopMatrix();

	glPushMatrix();
	glTranslatef(4.0f, 0.0f, 13.5f);
	glScalef(0.5f, 0.45f, 0.5f);
	glRotatef(215, 0.0f, 1.0f, 0.0f);
	drawTree();
	glPopMatrix();

	glPushMatrix();
	glTranslatef(8.0f, 0.0f, 13.5f);
	glScalef(0.5f, 0.45f, 0.5f);
	glRotatef(65, 0.0f, 1.0f, 0.0f);
	drawTree();
	glPopMatrix();

	glPushMatrix();
	glTranslatef(10.0f, 0.0f, 13.5f);
	glScalef(0.5f, 0.45f, 0.5f);
	glRotatef(10, 0.0f, 1.0f, 0.0f);
	drawTree();
	glPopMatrix();

	glPushMatrix();
	glTranslatef(13.5f, 0.0f, 13.5f);
	glScalef(0.5f, 0.45f, 0.5f);
	glRotatef(110, 0.0f, 1.0f, 0.0f);
	drawTree();
	glPopMatrix();

	glPushMatrix();
	glTranslatef(16.0f, 0.0f, 13.5f);
	glScalef(0.5f, 0.45f, 0.5f);
	glRotatef(90, 0.0f, 1.0f, 0.0f);
	drawTree();
	glPopMatrix();

	//traffic cones
	glPushMatrix();
	glTranslatef(4.5f, 0.0f, -1.5f); //(4.5,-1.5)
	drawTrafficCone();
	glTranslatef(0.0f, 0.0f, 3.0f); //(4.5,1.5)
	drawTrafficCone();
	glTranslatef(-1.0f, 0.0f, 2.0f); //(3.5,3.5)
	drawTrafficCone();
	glTranslatef(2.0f, 0.0f, 2.0f); //(5.5,5.5)
	drawTrafficCone();
	glTranslatef(-2.0f, 0.0f, 2.0f); //(3.5,7.5);
	drawTrafficCone();
	glTranslatef(1.0f, 0.0f, 1.0f); //(4.5, 8.5);
	glPopMatrix();

	//bumpers
	glPushMatrix();
	glColor3f(1.0f, 1.0f, 1.0f);
	//glTranslatef(-14.5f, 0.0f, -12.5f);
	drawBumpers();
	/*for (int i=0; i<5; i++)
	{
		glTranslatef(1.0f, 0.0f, 0.0f);
		drawBumpers();
	}

	//starting line is here

	glTranslatef(2.0f, 0.0f, 0.0f);
	drawBumpers();
	for (int i=0; i<22; i++)
	{
		glTranslatef(1.0f, 0.0f, 0.0f);
		drawBumpers();
	}*/
	glPopMatrix();

}

